package week6;

import java.util.Scanner;

public class q3 {
    public static void main(String[] args) {
        System.out.println("请输入员工的个数：");
        Scanner sc = new Scanner(System.in);
        Employee employee[] = new Employee[sc.nextInt()];
        for (int i = 0; i < employee.length; i++) {
            employee[i]=new Employee();
            System.out.println("请输入第"+(i+1)+"个员工的姓名");
            employee[i].setName(sc.next());
            System.out.println("请输入第"+(i+1)+"个员工的性别");
            employee[i].setGender(sc.next());
            System.out.println("请输入第"+(i+1)+"个员工的年龄");
            employee[i].setAge(sc.nextInt());
            System.out.println("请输入第"+(i+1)+"个员工的电话");
            employee[i].setPhone(sc.next());
        }
        for (int i = 0; i < employee.length; i++) {
            System.out.println(employee[i].getInfo());
        }
    }
}
